import http from "@/api";

/**
 * @name 流水记录
 */
// 流水记录列表
export const flowsListApi = (params) => {
  return http.get(`/api/v1/flows`, {...params}, { loading: true });
};
// 新增
export const flowsSaveApi = (params) => {
  return http.post(`/api/v1/flows/generate`, params, { loading: false });
};
// 编辑
export const flowsEditApi = (params) => {
  return http.put(`/api/v1/flows/` + params.flow_id, params, { loading: false });
};
// 流水记录成本
export const flowsInfoApi = (id) => {
  return http.get(`/api/v1/flows/` + id + `/cost-records`, { loading: true });
};
// 删除流水记录
export const flowsDelApi = (id) => {
  return http.delete(`/api/v1/flows/` + id, {}, { loading: true });
};